package com.ruoyi.system.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单明细:记录每个订单的商品详情对象 super_order_item
 * 
 * @author ruoyi
 * @date 2025-08-13
 */
public class SuperOrderItem extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 明细ID,主键,自增 */
    private Long id;

    /** 所属订单ID,外键 */
    @Excel(name = "所属订单ID,外键")
    private Long orderId;

    /** 商品ID,外键 */
    @Excel(name = "商品ID,外键")
    private Long productId;

    /** 商品名称(冗余存储) */
    @Excel(name = "商品名称(冗余存储)")
    private String productName;

    /** 商品图片(冗余存储) */
    private String productImage;

    /** 购买数量 */
    @Excel(name = "购买数量")
    private Long quantity;

    /** 单价 */
    @Excel(name = "单价")
    private BigDecimal unitPrice;

    /** 小计金额 */
    @Excel(name = "小计金额")
    private BigDecimal subtotal;

    /** 删除标记(0存在) */
    @Excel(name = "删除标记(0存在)")
    private Long del;

    public String getProductImage() {
        return productImage;
    }

    public void setProductImage(String productImage) {
        this.productImage = productImage;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setOrderId(Long orderId) 
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }

    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }

    public void setProductName(String productName) 
    {
        this.productName = productName;
    }

    public String getProductName() 
    {
        return productName;
    }

    public void setQuantity(Long quantity) 
    {
        this.quantity = quantity;
    }

    public Long getQuantity() 
    {
        return quantity;
    }

    public void setUnitPrice(BigDecimal unitPrice) 
    {
        this.unitPrice = unitPrice;
    }

    public BigDecimal getUnitPrice() 
    {
        return unitPrice;
    }

    public void setSubtotal(BigDecimal subtotal) 
    {
        this.subtotal = subtotal;
    }

    public BigDecimal getSubtotal() 
    {
        return subtotal;
    }

    public void setDel(Long del) 
    {
        this.del = del;
    }

    public Long getDel() 
    {
        return del;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderId", getOrderId())
            .append("productId", getProductId())
            .append("productName", getProductName())
            .append("quantity", getQuantity())
            .append("unitPrice", getUnitPrice())
            .append("subtotal", getSubtotal())
            .append("del", getDel())
            .toString();
    }
}
